package io.a;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class LogApplication {

    private static Logger l = LoggerFactory.getLogger(LogApplication.class);

    public static void main(String[] args) {
        ch.qos.logback.classic.Logger logger =
                (ch.qos.logback.classic.Logger)LoggerFactory.getLogger("com.baeldung.logback");
        logger.debug("Hi there!");

        Logger rootLogger =
                (ch.qos.logback.classic.Logger)LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
        logger.debug("This message is logged because DEBUG == DEBUG.");

//        rootLogger.setLevel(Level.ERROR);

        logger.warn("This message is not logged because WARN < ERROR.");
        logger.error("This is logged.");
        for (int i = 0; i < 10000; i++) {
            l.error("hello");
        }
        l.info("hello");
    }
}
